<?php

Yii::setPathOfAlias( 'frontend', dirname( __FILE__ ) . '/../../' );

return CMap::mergeArray(
	require('common/config/main.php'), 
	array(
		'basePath'	=> 'frontend',
		'defaultController' => 'site',

		'import' => array(
			'frontend.modules.user.models.*',
		),

		'modules' => array(
			//////////////////////
			// settings for Gii //
			//////////////////////
			'gii' => array(
				'class' 	=> 'system.gii.GiiModule',
				'password'	=> 'brghaa'
			),

			//////////////////////////////
			// user management settings //
			//////////////////////////////
			'user' => array(
				'debug' => false,
				'usersTable' => 'user',
				'translationTable' => 'translation',
			),
			'usergroup' => array(
				'usergroupTable' => 'user_group',
				'usergroupMessagesTable' => 'user_group_message',
			),
			'membership' => array(
				'membershipTable' => 'membership',
				'paymentTable' => 'payment',
			),
			'friendship' => array(
				'friendshipTable' => 'friendship',
			),
			'profile' => array(
				'privacySettingTable' => 'privacy_setting',
				'profileFieldsGroupTable' => 'profile_field_group',
				'profileFieldsTable' => 'profile_field',
				'profileTable' => 'profile',
				'profileCommentTable' => 'profile_comment',
				'profileVisitTable' => 'profile_visit',
			),
			'role' => array(
				'rolesTable' => 'role',
				'userHasRoleTable' => 'user_role',
				'actionTable' => 'action',
				'permissionTable' => 'permission',
			),
			'messages' => array(
				'messagesTable' => 'message',
			),
		),
		// end of modules

		'components' => array(
			'user' => array(
				'class' => 'application.modules.user.components.YumWebUser',
				'allowAutoLogin'=>true,
				'loginUrl' => array('//user/user/login'),
			)
		),
	)
);
